package com.pojo;

import com.validation.UGroup1;
import com.validation.UGroup2;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

public class User {

    @NotEmpty(message = "{user.username.isEmpty}",groups = {UGroup1.class})
    String username;
    @Size(min = 1,max = 20 ,message = "{user.password.length.error}",groups = {UGroup2.class})
    String password;
    String keystr;

    public User() {
    }

    public String getKeystr() {
        return keystr;
    }

    public User(String username, String password, String keystr) {
        this.username = username;
        this.password = password;
        this.keystr = keystr;
    }

    public void setKeystr(String keystr) {
        this.keystr = keystr;
    }


    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
